package com.twu.biblioteca;

import javafx.scene.web.WebHistory;

import java.io.*;
import java.util.List;
import java.util.Map;

public class Biblioteca {
    private IOManager ioManager;
    private Map<String, LibraryAction> options;
    private Menu menu;


    //Default Actions
    private String LIST_BOOKS = "1";


    public Biblioteca(IOManager ioManager, Map<String, LibraryAction> options, Menu menu) {
        this.ioManager = ioManager;
        this.options = options;
        this.menu = menu;
    }

    public void run(){
        displayWelcomeMessage();
        options.get(LIST_BOOKS).performAction();
        while(menu.keepGoing()){
            menu.go();
        }
    }

    public void displayWelcomeMessage() {
        ioManager.print("Welcome to Biblioteca");
    }




}
